<template>
  <div class="top-header">
     <div class="is-left" v-show="isLeft">
      <a-icon type="left" @click="$router.go(-1)" />
    </div>
    <!-- 中间标题 -->
    <div>
      <h1 class="header-title">{{ title }}</h1>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: String,
     isLeft: {
      type: Boolean,
      default: false,
    },
  },
};
</script>
<style lang="scss" scoped>
.top-header {
  width: 375.2px;
  height: 50px;
  align-items: center;
  background-color: $module-color;
  box-sizing: border-box;
  color: $font-color;
  padding: $common-padding;
  height: 4rem;
  // display: flex;
  // justify-content: center;
  position: fixed;
  top:0px;
  // z-index: 1000px;
  align-items: center;
  box-shadow: 0px 5px 2px rgba($color: #ccc, $alpha: 0.1);
  .is-left {
    margin-top: 10px;
    font-size: 20px;
  // flex-grow: 1;
  float: left; }
    .header-title {
      width:250px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;     
      font-size: 20px;
      margin: 10px auto;
      text-align: center;
      font-size: 1.5rem;
      font-weight: bolder;
   
  }
}
</style>
